<div class="box">
    <div class="heading">
      <h1><img src="image/book.png" alt="" />Management Rss Feed</h1>
      <div class="buttons">
        <?php echo CHtml::link('Insert',array('rss/create/'.$_GET['id']),array('class'=>'button')); ?>
          <a onclick="confirm('Are you sure you want to delete this book?')" class="button">Delete</a>
      </div>
    </div>
    <div class="content">
      <form action="delete" method="post" enctype="multipart/form-data" id="form">
        <table class="list">
          <thead>
            <tr>
              <td width="1" style="text-align: center;"><input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);"></td>
              <td class="left">Rss ID</td>
              <td class="left">Rss Link</td>
              <td class="left">Category</td>
              <td class="left">Created At</td>
              <td class="left">Updated At</td>  
              <td class="center">Action</td>
            </tr>
          </thead>
          <tbody>
            
            <?php foreach($rss as $r){?>
            <tr>
              <td style="text-align: center;">
                <input type="checkbox" name="selected[]" value="book_id" />
              </td>
              <?php
              $category = Category::model()->findByPK($r->category_id);
              ?>
              <td class="left"><?php echo $r->rss_id ?></td>
              <td class="left"><a href="<?php echo $r->rss_link?>"><?php echo $r->rss_link?></a></td>
              <td class="left"><?php echo $category->category_name ?></td>
              <td class="left"><?php echo $r->rss_created_at ?></td>
              <td class="left"><?php echo $r->rss_updated_at ?></td>
              
              <td class="center">
                  <?php echo CHtml::link('Update', array('rss/update', 'id'=>$r->rss_id)); ?>|
                  <?php echo CHtml::link('Delete',"#", array("submit"=>array('rss/delete', 'id'=>$r->rss_id), 'confirm' => 'Are you sure?')); ?>
                
              </td>
            </tr>
            <?php }?>
          </tbody>
        </table>
      </form>
    </div>
  </div>